package crudfx.navigation;
import javafx.stage.*;
import javafx.scene.*;
import javax.swing.*;
import crudfx.navigation.*;
/**
 * @profile desktop
 * @author Sergey Surikov
 */
public class FormSubMenu {
    var jMenu:JMenu;
    public var text:String on replace {jMenu.setText(text);};
    public var content:MenuPad[] on replace {setItems()};
    init{
        jMenu=new JMenu(text);
        setItems();
        }
    function setItems(){
        jMenu.removeAll();
        for(i:MenuPad in content){i.addMenu(jMenu);}
        }
    public function add(jMenuBar:JMenuBar):Void{
        jMenuBar.add(jMenu);
        }
    }
